from code_builder.tools import utils

def jsp_insert_name(table_name):
    base_file_name = utils.to_cap_camel_case(table_name)
    return "insert{base_file_name}.jsp".format(base_file_name=base_file_name)

def jsp_update_name(table_name):
    base_file_name = utils.to_cap_camel_case(table_name)
    return "update{base_file_name}.jsp".format(base_file_name=base_file_name)

def dao_name(table_name):
    return "{ob_name}Mapper.java".format(ob_name=utils.to_cap_camel_case(table_name))

def service_name(table_name):
    return "{ob_name}Service.java".format(ob_name=utils.to_cap_camel_case(table_name))

def service_impl_name(table_name):
    return "{ob_name}ServiceImpl.java".format(ob_name=utils.to_cap_camel_case(table_name))

def controller_name(table_name):
    return "{ob_name}Controller.java".format(ob_name=utils.to_cap_camel_case(table_name))

def entity_name(table_name):
    return "{ob_name}.java".format(ob_name=utils.to_cap_camel_case(table_name))

def mapper_name(table_name):
    return "{ob_name}Mapper.xml".format(ob_name=utils.to_cap_camel_case(table_name))